<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 

<!--模糊查询js与css文件-->
<link type="text/css" rel="stylesheet" href="__JS__/jqueryUI/themes/base/jquery.ui.all.css" />
<script type="text/javascript" src="__JS__/jqueryUI/ui/jquery-ui.js"></script>	

<script type="text/javascript" src="__JS__/jianfanzhuanhuan.js"></script>
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<script>
</script>

<form name="form" action="{:U('donews')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="id" value="{$id}" />

<style>
.infoBoxTd{width:15%;min-width:100px;}
.checkboxml{margin-left:10px;}
.fred{color:#CC0000;}
.zishutishi{width:400px;height:80px;line-height:80px;font-size:22px;padding:0px 40px;color:#f00;background:url(__PUBLIC__/images/btm_bg_hei.png) repeat;position:fixed;left:20%;top:20%;z-index:999;display:none;}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="infoBoxTd">&nbsp;</td>
		<td align="left"><a href="./index.php?a=news&m=index&arid={$id}" target="_blank" class="buttom" >预览</a></td>
	</tr>
	<tr>
		<td class="infoBoxTd">&nbsp;</td>
		<td align="left">
			<php>
			if(!$state){
			</php>
				<input type="submit" name="Button1" value="提交审核" class="formInput01" />
			<php>
			}else{
			</php>
				<input type="submit" name="Button1" value="保存" class="formInput01" />
			<php>
			}
			</php>
		</td>
	</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="basic">
<tr>
	<td class="infoBoxTd">标题：</td>
	<td colspan="2">
	<INPUT name="name" value="{$name}" class="formTitle xzzsinput" size="80" maxlength="50" onkeyup="word_count(50,this)" onblur="auto_save('name')" >您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">50</span>字。
	</td>
</tr>

<volist name="lang_name" id="lang_name">
<tr>
<td width="11%" class="infoBoxTd">标题（<span class="lang_name" lang_daihao="{$lang_name.nid}">{$lang_name.name}</span>）：</td>
<td colspan="2">
<input type="text" name="name{$lang_name.id}" value="{$lang_name.menu_name}" class="formTitle xzzsinput" size="80" maxlength="150" onkeyup="word_count(150,this)" onblur="auto_save('name{$lang_name.id}')" style="float:left;margin-right:10px;" />您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">150</span>字。

</td>
</tr>
</volist>


<tr>
	<td class="infoBoxTd">简介：</td>
	<td colspan="2">
	<INPUT name="namesm" value="{$namesm}" class="formTitle xzzsinput" size="80" maxlength="200" onkeyup="word_count(200,this)" onblur="auto_save('namesm')" >您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">200</span>字。
	</td>
</tr>

<volist name="lang_namesm" id="lang_namesm">
<tr>
<td width="11%" class="infoBoxTd">简介（<span class="lang_name" lang_daihao="{$lang_namesm.nid}">{$lang_namesm.name}</span>）：</td>
<td colspan="2">
<input type="text" name="namesm{$lang_namesm.id}" value="{$lang_namesm.menu_namesm}" class="formTitle xzzsinput" size="80" maxlength="600" onkeyup="word_count(600,this)" onblur="auto_save('namesm{$lang_namesm.id}')" style="float:left;margin-right:10px;" />您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">600</span>字。
</td>
</tr>
</volist>


<tr>
	<td class="infoBoxTd">封面图：</td>
	<td  colspan="2">
		<img id="zhutu" src="<neq name='zhutu' value=''>{$zhutu}<else/>__PUBLIC__/images/nopic.gif</neq>" width="280" height="93" style="float:left;margin-right:20px;" />
		<div class="upimg-box"><div id="fileQueue"></div>
		<input id="file_upload_zhutu" type="file" /><input name="zhutu" type="hidden" value="{$zhutu}"  /></div>
		<div class="tj_xiangsu">
			推荐像素：240px * 160px
		</div>
	</td>
</tr>
<volist name="lang_zhutu" id="lang_zhutu">
<tr>
	<td class="infoBoxTd">封面图（<span class="lang_name" lang_daihao="{$lang_zhutu.nid}">{$lang_zhutu.name}</span>）：</td>
	<td  colspan="2">
		<img id="zhutu{$lang_zhutu.id}" src="<neq name='lang_zhutu.menu_zhutu' value=''>{$lang_zhutu.menu_zhutu}<else/>__PUBLIC__/images/nopic.gif</neq>" width="280" height="93" style="float:left;margin-right:20px;" />
		<div class="upimg-box"><div id="fileQueue{$lang_zhutu.id}"></div>
		<input id="file_upload_zhutu{$lang_zhutu.id}" type="file" /><input name="zhutu{$lang_zhutu.id}" type="hidden" value="{$lang_zhutu.menu_zhutu}" class="suoyou_img"  /></div>
		<div class="tj_xiangsu">
			推荐像素：240px * 160px
		</div>
	</td>
</tr>
<script type="text/javascript">
	//图片上传
	$("#file_upload_zhutu{$lang_zhutu.id}").uploadify({
			'uploader'       : '__JS__/swf/uploadify.swf',
			'script'         : '__JS__/upload/uploadify.php',
			'cancelImg'      : '__JS__/upload/cancel.png',
			'folder'         : 'data/zhutu{$lang_zhutu.id}',
			'queueID'        : 'fileQueue',
			'sizeLimit'      :	2 * 1000 * 1024,
			'fileExt'        : '*.jpg;*.gif;*.png;', //允许文件上传类型,和fileDesc一起使用.
			'fileDesc'       : '*.jpg;*.gif;*.png;',  //选择文件对话框中的提示文本.
			'auto'           : true,
			'multi'          : false,	
			'onComplete':function(event,queueId,fileObj,response,data){
				$('input[name="zhutu{$lang_zhutu.id}"]').val(response);
				$('#zhutu{$lang_zhutu.id}').attr('src', response);
			}
	});
</script>
</volist>


<tr>
    <td class="infoBoxTd" >文章内容：</td>
    <td colspan="2">
		<textarea id="content" name="content" style="width:800px;height:300px;" class="sauto_save_textarea">{$content|stripslashes}</textarea>
	</td>
</tr>
<volist name="lang_content" id="lang_content">
<tr>
    <td class="infoBoxTd" >文章内容（<span class="lang_name" lang_daihao="{$lang_content.nid}">{$lang_content.name}</span>）：</td>
    <td colspan="2">
		<textarea id="content{$lang_content.id}" name="content{$lang_content.id}" style="width:800px;height:300px;" class="sauto_save_textarea">{$lang_content.menu_content|stripslashes}</textarea>
	</td>
	<script type="text/javascript">
	//编辑器
	var k00{$lang_content.id}; //文章内容
	KindEditor.ready(function(K) {
		k00{$lang_content.id} = K.create('#content{$lang_content.id}', {
			allowFileManager : true,
			afterChange : function() {
				K('#word_count00{$lang_content.id}').html(this.count('text'));
				$('#word_yu00{$lang_content.id}').html(9000-this.count('text'));
				if(this.count('text')>9000){
					$("#zishutishi00{$lang_content.id}").show();
					$("#zishutishi00{$lang_content.id}").text("超出字数限制！无法保存！");
				}else{
					$("#zishutishi00{$lang_content.id}").hide();
					$("#zishutishi00{$lang_content.id}").text("");
				}
			}
		});
	});
	</script>
</tr>
</volist>


<tr>
	<td class="infoBoxTd">上刊时间：</td>
	<td colspan="2"><gt name="ctime" value="0">{$ctime|date='Y-m-d H:i:s',###}</gt></td>
</tr>

<tr>
	<td class="infoBoxTd">上次修改时间：</td>
	<td colspan="2"><gt name="stime" value="0">{$stime|date='Y-m-d H:i:s',###}</gt></td>
</tr>

<tr>
	<td class="infoBoxTd">被赞次数：</td>
	<td colspan="2"><input name="zan" value="{$zan}" class="formTitle"  /></td>
</tr>

<tr>
	<td class="infoBoxTd">被踩次数：</td>
	<td colspan="2"><input name="cai" value="{$cai}" class="formTitle"  /></td>
</tr>

<tr>
	<td class="infoBoxTd">被阅读次数：</td>
	<td colspan="2"><input name="readss" value="{$readss}" class="formTitle"  /></td>
</tr>

<tr>
	<td class="infoBoxTd">被收藏次数：</td>
	<td colspan="2"><input name="follows" value="{$follows}" class="formTitle"  /></td>
</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="infoBoxTd">&nbsp;</td>
		<td align="left"><a href="./index.php?a=news&m=index&arid={$id}" target="_blank" class="buttom" >预览</a></td>
	</tr>
	<tr>
		<td class="infoBoxTd">&nbsp;</td>
		<td align="left">
			<php>
			if(!$state){
			</php>
				<input type="submit" name="Button1" value="提交审核" class="formInput01" />
			<php>
			}else{
			</php>
				<input type="submit" name="Button1" value="保存" class="formInput01" />
			<php>
			}
			</php>
		</td>
	</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
    

<include file="Public:footer" />
<script type="text/javascript">
//编辑器
var k1; //文章内容
KindEditor.ready(function(K) {
	k1 = K.create('#content', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count1').html(this.count('text'));
			$('#word_yu1').html(3000-this.count('text'));
			if(this.count('text')>3000){
				$("#zishutishi1").show();
				$("#zishutishi1").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi1").hide();
				$("#zishutishi1").text("");
			}
		}
	});
});

//图片上传
$("#file_upload_zhutu").uploadify({
		'uploader'       : '__JS__/swf/uploadify.swf',
		'script'         : '__JS__/upload/uploadify.php',
		'cancelImg'      : '__JS__/upload/cancel.png',
		'folder'         : 'data/zhutu',
		'queueID'        : 'fileQueue',
		'sizeLimit'      :	2 * 1000 * 1024,
		'fileExt'        : '*.jpg;*.gif;*.png;', //允许文件上传类型,和fileDesc一起使用.
		'fileDesc'       : '*.jpg;*.gif;*.png;',  //选择文件对话框中的提示文本.
		'auto'           : true,
		'multi'          : false,	
		'onComplete':function(event,queueId,fileObj,response,data){
			$('input[name="zhutu"]').val(response);
			$('#zhutu').attr('src', response);
		}
});





</script>

